#程序名字
APPCLINAEM=cli_send_temperature
APPSERNAEM=ser_receive_temperture
#库位置
LIBPATH=`pwd`/../lib
#指定头文件的路径
CFLAGS=-I${LIBPATH}
#指定库文件位置
LDFLAGS=-L${LIBPATH}

CC=gcc

all:
	${CC} client.c ${CFLAGS} ${LDFLAGS} -o ${APPCLINAEM} -llogger -lsqlite3 -ldl -lpthread -ltempall -L ~/lib/ -I ~/lib/
	${CC} server.c ${CFLAGS} ${LDFLAGS} -o ${APPSERNAEM} -ltempall -llogger -lsqlite3 -ldl -lpthread -L ~/lib/ -I ~/lib/
clean:
	rm -rf ${APPCLINAEM}
	rm -rf ${APPSERNAEM}

runcli:
	export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${LIBPATH}:/home/dairongan/lib/;./${APPCLINAEM} -i 127.0.0.1 -p 7025 -t 1
runser:
	export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${LIBPATH}:/home/dairongan/lib/;./${APPSERNAEM} -p 7025



